Copyright(C) 1994 Terumasa KODAKA , Takeshi KONO ■HD BIOS HD BIOS Overview o HD BIOS is a BIOS for accessing hard disks, MO, CD-ROMs, etc. In HD BIOS, the lower 4 bits of AH specify the operation, and the upper 4 bits specify the functions associated with that operation. For this reason, in HD BIOS, the values of the lower 4 bits are arranged in ascending order. Terminology SASI (SASI I/F, SASI HD, SASI BIOS) o SASI type is the hard disk that was first supported by PC-9800. In this book, SASI hard disk interface is called SASI I/F, SASI type hard disk drive is called SASI HD, and the BIOS that controls them is called SASI BIOS. o Up to two SASI HDs can be connected to the SASI I/F. The maximum capacity of SASI HD per unit for NEC products is 40MB, but some third-party products have a capacity larger than that. o SASI I/Fs that are implemented in the expansion slot include PC-9801-07 and 27. Some models have a built-in SASI I/F, and some models allow you to add built-in drives. o The SASI BIOS is usually located at D7000-D7FFFh in normal mode (except for the PC-9801M), and at D6000-D6FFFh on the PC-9801M. In high-resolution mode, it is included in the main BIOS ROM (segment F800h). Terminology SCSI (SCSI I/F, SCSI HD, SCSI BIOS) o SCSI was introduced to connect large-capacity hard disks and various peripheral devices. In this book, the SCSI hard disk interface is called the SCSI I/F, the SCSI hard disk drive is called the SCSI HD, and the BIOS that controls these is called the SCSI BIOS. o The BIOS ROM on the SCSI I/F contains not only the SCSI BIOS, but also the SCSI interface common BIOS, which can control all SCSI devices. Both the SCSI BIOS and the SCSI interface common BIOS are called with INT 1Bh. Either one is selected depending on the value of DA/UA. ... 3.5" MO is supported from version 5.0 onwards. o The SCSI BIOS is usually located at DC000 - DCFFFh in normal mode (except for the PC-9801-E-F-M), and at D4000 - D4FFFh on the PC-9801-E-F-M. In high-resolution mode it is located at EC000 - ECFFFh. However, the ROM address of the BIOS of the PC-H98-B03-B12 and compatible H98 built-in SCSI is determined during setup. The BIOS size is also 8KB. o The PC-9801-55-55L-55U, PC-H98-B03 (and compatible built-in SCSI I/Fs) cannot connect hard disks whose vendor name obtained with the SCSI INQUIRY command does not begin with "NEC" in the first 3 bytes. There is no such restriction with MO or CD-ROM. The PC-9801-92, PC-H98-B12 (and compatible built-in SCSI I/Fs) do not check the vendor name. ... MS-DOS officially supports ESDI HD from version 3.3B onwards. In fact, it was supported from version 3.3 (PS98-013). Products prior to MS-DOS 3.1 do not support ESDI HD. o The ROM address of the ESDI BIOS is determined during setup. The BIOS size is 8K bytes. o It can coexist with the SASI I/F and SCSI I/F. Terminology IDE (IDE I/F, IDE HD, IDE BIOS, IDE CD-ROM) o IDE was first introduced as a 2.5-inch hard disk for inclusion in the 98NOTE. It was later adopted for desktops due to its superiority in terms of performance and price. Only the built-in type exists. In this book, the hard disk interface for IDE is called the IDE I/F, the IDE type hard disk drive is called the IDE HD, and the BIOS that controls these is called the IDE BIOS. o IDE HD can be built into 98NOTE, PC-9821, PC-9801UR/US/BA/BX/BA2/BS2/BX2, and PC-H98T. PC-9821Bp/Bs/Be, PC-9801BA2/BS2/BX2 can use a second IDE. Other models can use only one. You can choose between a hard disk or a CD-ROM for the second IDE. A CD-ROM connected to the IDE I/F is called an IDE CD-ROM. o IDE BIOS is usually located at D8000-DBFFFh in normal mode. In high-resolution mode, it is located at E6000-E9FFFh. On IDE-supported machines other than 98NOTE, IDE BIOS appears only when an IDE HD/CD-ROM is built in. 98NOTE's IDE BIOS exists at the same address as the RAM drive and the BIOS for system control. o At the BIOS level, it is compatible with SASI BIOS. If the capacity is 40MB or less, it can be used with MS-DOS versions earlier than 3.1. If the capacity is more than 40MB, MS-DOS 3.3 or later is required. o Can coexist with SCSI I/F. There are no models that have both ESDI and IDE built in. If IDE BIOS appears, SASI I/F cannot be used. Terminology Linear sector address o A method of specifying the sector to access. A method of assigning consecutive numbers starting from 0 to all sectors on the disk and specifying the sector by that number. It can be accessed as if it were a one-dimensional array (one element of the array is one sector). u Linear sector address is used when accessing MO or CD-ROM. Terminology Absolute sector address o A method of specifying the sector to access. When specifying the sector, the cylinder number, head number, and sector number within the track are used. u It is better not to use absolute sector address when accessing MO or CD-ROM. Terminology DA/UA o DISK BIOS uses a value called DA/UA (Device Address/Unit Address) to specify the name of the device to be accessed. The upper 4 bits of DA specify the type of device. The lower 4 bits of UA specify the number of the drive among devices of the same type. For example, to specify the first HDD connected to the SASI I/F, use DA/UA=80h, and to specify the second, use DA/UA=81h. For devices connected to the SCSI I/F, specify the same value as the SCSI ID for UA. o HD BIOS provides two ways to specify the sector to be accessed (linear sector address and absolute sector address). For the same drive, a DA value is assigned for each sector specification method (see table: "HD BIOS sector specification method and DA/UA correspondence"). For example, to access a HDD with SCSI ID 0 using a linear sector address, specify DA/UA=20h. To access with absolute sector address, specify DA/UA=A0h. To access the second HDD of IDE with linear sector address, specify DA/UA=01h. Table HD BIOS sector specification method and DA/UA correspondence -----------------------------+--------------+--------------- \Sector specification method|Linear sector |Absolute sector Interface type \| Address | Address -----------------------------+--------------+--------------- SASI/ESDI/IDE | 00-03h | 80-83h SCSI | 20-26h | A0-A6h -----------------------------+--------------+--------------- * n=Device number o For reference, a list of DA/UAs is shown in the table "List of all DA/UAs and device correspondence". Table All DA/UA and device correspondences -------+--------------------------------------------------------------- DA/UA | Device -------+--------------------------------------------------------------- 00h | SASI/IDE HD #1 (linear sector addressing) 01h | SASI/IDE HD/CD-ROM #2 (linear sector addressing) 02h | ESDI HD (linear sector addressing) 03h | SASI HD (ESDI I/F connection) (linear sector addressing) 04-07h | Used by NECCD.SYS 10-13h | Dual-use BIOS - 1MB I/F mode + 640KB access mode 20h | SCSI HD/MO/CD-ROM: SCSI ID=0 (linear sector addressing) 21h | SCSI HD/MO/CD-ROM: SCSI ID=1 (linear sector addressing) 22h | SCSI HD/MO/CD-ROM: SCSI ID=2 (linear sector addressing) 23h | SCSI HD/MO/CD-ROM: SCSI ID=3 (linear sector addressing) 24h | SCSI HD/MO/CD-ROM: SCSI ID=4 (linear sector addressing) 25h | SCSI HD/MO/CD-ROM: SCSI ID=5 (linear sector addressing) 26h | SCSI HD/MO/CD-ROM: SCSI ID=6 (linear sector addressing) 30-33h | Dual-use BIOS - 1MB I/F mode + 1.44MB access mode 40h | For initializing RAM drive BIOS 50-53h | 320KB FD BIOS 60-63h | BRANCH 4670 virtual disk 70-73h | 640KB dedicated BIOS, dual-use BIOS - 640KB I/F mode + 640KB access mode 80h | SASI/IDE HD #1 (absolute sector address specification) 81h | SASI/IDE HD/CD-ROM #2 (absolute sector address specification) 82h | ESDI HD (absolute sector address specification) 83h | SASI HD (ESDI I/F connection) (absolute sector address specification) 84-87h | Used by NECCD.SYS 90-93h | 1MB dedicated BIOS, dual-use BIOS - 1MB I/F mode + 1MB access mode A0h | SCSI HD/MO/CD-ROM: SCSI ID=0 (absolute sector address specification) A1h | SCSI HD/MO/CD-ROM: SCSI ID=1 (absolute sector address specification) A2h | SCSI HD/MO/CD-ROM: SCSI ID=2 (absolute sector address specification) A3h | SCSI HD/MO/CD-ROM: SCSI ID=3 (absolute sector address specification) A4h | SCSI HD/MO/CD-ROM: SCSI ID=4 (absolute sector address) A5h | SCSI HD/MO/CD-ROM: SCSI ID=5 (absolute sector address) A6h | SCSI HD/MO/CD-ROM: SCSI ID=6 (absolute sector address) B0-B3h | Dual-use BIOS - 1MB I/F mode + 1.44MB access mode (Undocumented) C0h | SCSI DEVICE: SCSI ID=0 C1h | SCSI DEVICE: SCSI ID=1 C2h | SCSI DEVICE: SCSI ID=2 C3h | SCSI DEVICE: SCSI ID=3 C4h | SCSI DEVICE: SCSI ID=4 C5h | SCSI DEVICE: SCSI ID=5 C6h | SCSI DEVICE: SCSI ID=6 D0h | ROM drive (cannot be accessed with DISK BIOS) D1h | PCMCIA memory card (cannot be accessed with DISK BIOS) E0h | RAMDISK.SYS F0-F3h | Dual-use BIOS - 640KB I/F mode + 1MB access mode -------+--------------------------------------------------------------- ■Return Code List ---------------+---+------------------------------------ AH |CF |Contents ---------------+---+------------------------------------ 0000xxxxb(00h) | 0 | Normal End 00001xxxb(08h) | 0 | Corrected Data 0001xxxxb(10h) | 0 | Control Mark 0010xxxxb(20h) | 1 | DMA Boundary 00111xxxb(38h) | 1 | Illegal Disk Address 0100xxxxb(40h) | 1 | Equipment Check 0101xxxxb(50h) | 1 | Over Run 0110xxxxb(60h) | 1 | Not Ready 1110xxxxb(70h) | 1 | Not Writable 10001xxxb(88h) | 1 | Direct Access an Alternate Track 1001xxxxb(90h) | 1 | Time Out 1010xxxxb(A0h) | 1 | Data Error (ID) 1011xxxxb(B0h) | 1 | Data Error (Data) 10111xxxb(B8h) | 1 | Data Error 1100xxxxb(C0h) | 1 | No Data 11001xxxb(C8h) | 1 | Seek Error 11011xxxb(D8h) | 1 | Unreadable Alternate Track 1110xxxxb(E0h) | 1 | Missing Address Mark (ID) 1111xxxxb(F0h) | 1 | Missing Address Mark (Data) ---------------+---+------------------------------------ INT 1Bh - Function 00h (SASI) Classification SASI BIOS Name Seek to specified cylinder Undocumented Target SASI (normal built-in type after PC-9801VX4) Input AH=x0h (x is arbitrary) AL=DA/UA ------------+-------------------------------------+------------ Device type | Sector address specification method | DA/UA value ------------+-------------------------------------+------------ SASI | Linear sector address | 00h,01h SASI | Absolute sector address | 80h,81h ------------+-------------------------------------+------------ ■When linear sector address is specified DX:CX=Linear sector address (0~) ■When absolute sector address is specified CX=Cylinder number (0~) DH=Head number (0~) DL=00h Output AH=Return code ----------+------------------------------------------ AH | Contents ----------+------------------------------------------ 00h(CF=0) | Normal End | Normal end 10h(CF=0) | Control Mark | Seek not completed within a certain time 40h(CF=1) | Equipment Check | BIOS specified by DA does not exist 90h(CF=1) | Time Out | Device not connected ----------+------------------------------------------ Explanation o Causes the head to seek to the cylinder where the specified sector exists. o This function is only present in the built-in SASI BIOS in normal mode for PC-9801VX4 and later. It does not exist in PC-9801-27, SCSI/ESDI/IDE BIOS, SASI BIOS in high-resolution mode, etc. Related INT 1Bh - Function B0h (SCSI) Classification DISK BIOS Name Sending commands to WD33C93 Undocumented Target SCSI (excluding the first generation PC-9801-55) Input AH=D0h ------------+--------------- Device type | DA/UA value ------------+--------------- SCSI | 20-26h, A0-A6h ------------+--------------- DS:SI=Start address of memory that stores the command to be sent to WD33C93 DX=Size of command to be sent to WD33C93 (unit: byte) ES:BP=Start address of buffer for sending and receiving with SCSI device BX=Size of buffer for sending and receiving with SCSI device (unit: byte) Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist -----------+------------------------------------------ Explanation o Sends commands to the WD33C93 (SCSI controller) on the SCSI I/F and transmits/receives data. o DS:SI(ES:BP) and DX(BX) must be set so that the specified area does not cross the 64K byte boundary of the physical address. For example, you cannot specify an area such as DS:SI=7000:FF00h, DX=0400h. Related INT 1Bh - Function D0h (IDE) Classification DISK BIOS Name Preparation for motor status acquisition Undocumented Target IDE Input AH=D0h AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- IDE | 00h,01h,80h,81h ------------+----------- Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | BIOS specified by DA does not exist -----------+------------------------------------------ Explanation o Sends PowerCommand (E5h motor status sense) to IDE HD. The result is not reflected in the output register. o If you read from I/O 0644h (SectorCount) immediately after executing this function, the motor rotation status of the IDE HD will be returned. -------------------+-------------------------------- Value of I/O 0644h | Motor status -------------------+-------------------------------- FFh | Motor rotating 00h | Motor stopped BBh | Power lock (not used in PC-9800) -------------------+-------------------------------- Related INT 1Bh - Function E0h (IDE) INT 1Bh - Function F0h (IDE) 0000:0457h I/O 0644h INT 1Bh - Function E0h(IDE) Classification DISK BIOS Name MOTOR ON Undocumented Target IDE Input AH=E0h AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- IDE | 00h,01h,80h,81h ------------+----------- Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist -----------+------------------------------------------ Explanation o Turns on the spindle motor of the IDE HD. o Even if you do not execute this function, the motor will automatically turn on if you execute a function that accesses the hard disk. However, it usually takes 4 to 5 seconds to reach the READY state. Related INT 1Bh - Function D0h (IDE) INT 1Bh - Function F0h (IDE) INT 17h (External interrupt...IDE) 0000:0457h INT 1Bh - Function F0h (IDE) Category DISK BIOS Name MOTOR OFF Undocumented Target IDE Input AH=F0h AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- IDE | 00h,01h,80h,81h ------------+----------- Output AH=Return code ---------+------------------------------------------ AH | Contents ---------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist -----------+------------------------------------------ Explanation o Turns off the spindle motor of the IDE HD. o When a function that accesses the hard disk is executed, the motor automatically turns on. However, it usually takes 4 to 5 seconds until the READY state is reached. Related INT 1Bh - Function D0h (IDE) INT 1Bh - Function E0h (IDE) INT 1Fh - Function 9A07h INT 17h (External interrupt...IDE) 0000:0457h INT 1Bh - Function 01h (SASI/SCSI/ESDI/IDE) Classification DISK BIOS Name Verify (VERIFY) Target SASI, SCSI, ESDI, IDE Input AH= ■[SASI・ESDI・IDE] bit 7,6=00b bit 5=r 1=No retry 0=8 retry attempts bit 4=0 bit 3〜0=0001b ■[SCSI] bit 7=0 bit 6=e 1=Error sector notification 0=No error sector notification bit 5,4=00b bit 3〜0=0001b AL=DA/UA ------------+----------------------+----------- Device type|Sector addressing method|DA/UA value ------------+----------------------+----------- SASI・IDE |Linear sector address |00h,01h,03h SASI/IDE |Absolute sector address |80h,81h,83h ESDI |Linear sector address |02h ESDI |Absolute sector address |82h SCSI |Linear sector address |20-26h SCSI |Absolute sector address |A0-A6h ------------+----------------------+----------- BX=Number of bytes transferred ■When linear sector address is specified DX:CX=Linear sector address (0-) ■When absolute sector address is specified CX=Cylinder number (0-) DH=Head number (0-) DL=Sector number (0-) ES:BP=Transfer address Output CF=End condition 1=Abnormal end 0=Normal end AH=Status information ■[SCSI] When an error occurs with AH bit 6=1 (error sector notification), DX,CX=Error sector address Explanation o Reads the specified sector and returns a return code. u No transfer to memory is performed, but the input parameters are checked in the same way as INT 1Bh - Function 06h (SASI/SCSI/ESDI/IDE), so an error will occur if the following conditions are not met. o ES:BP (transfer address) and BX (number of bytes to transfer) must be set so that the specified area does not straddle the 64K byte boundary of the physical address. For example, an area such as ES:BP=7000:FF00h, BX=0400h cannot be specified. If this is not the case, a DMA boundary error will occur with SASI/ESDI/IDE BIOS. o BX (number of bytes to transfer) must be set to an integer multiple of the sector length. If a value that is not divisible by the sector length is specified, the fraction will be truncated. u If 0000h is specified for BX (number of bytes to transfer), a 64K byte read will be performed. (Undocumented) However, it seems that there are some BIOS that abnormally terminate without reading. u If BX (number of transfer bytes) is set to 1 to sector length - 1, the SASI/ESDI BIOS will hang. The SCSI BIOS will end normally without reading. The IDE BIOS will read 64K bytes. o The PC-H98 supports indirect mode, which allows transfers to areas larger than 1MB. Whether indirect mode is available can be determined by 0000:0590h bit 6 (SASI/ESDI), bit 4 (SCSI). To specify indirect mode, set 0000:0590h bit 7 (SASI/ESDI), bit 5 (SCSI) to 1. When this bit is 0, the previous direct mode is used. In direct mode, the transfer address is specified directly with ES:BP, but in indirect mode, the transfer address is specified indirectly with ES:BP. In other words, the transfer address is written to memory as a 32-bit linear address. ES:BP specifies the address of the memory where the 32-bit linear address is written. Once you run the BIOS in indirect mode, it will always return to direct mode. Related INT 1Bh - Function 02h (SCSI) 0000:0590h INT 1Bh - Function 02h (SCSI) Classification DISK BIOS Name Write and verify data (WRITE&VERIFY) Target SCSI Input AH bit 7=0 bit 6=e 1=Error sector notification 0=No error sector notification bit 5,4=00b bit 3~0=0010b AL=DA/UA ------------+-------------------------------------+------------ Device type | Sector address specification method | DA/UA value ------------+-------------------------------------+------------ SCSI | Linear sector address | 20~26h SCSI | Absolute sector address | A0~A6h ------------+-------------------------------------+------------ BX=Number of transfer bytes ■When linear sector address is specified DX:CX=Linear sector address (0~) ■When absolute sector address is specified CX=Cylinder number (0~) DH=Head number (0~) DL=Sector number (0~) ES:BP=Transfer address Output CF=End condition 1=Abnormal end 0=Normal end AH=Status information ■When an error occurs with AH bit 6=1 (error sector notification), DX,CX=Error sector address Explanation o After writing data to the specified sector, verify is performed. By using linear sector addressing, writing to MO is also possible. o ES:BP (transfer address) and BX (number of transfer bytes) must be set so that the transfer area does not cross the 64KB boundary of the physical address. For example, an area such as ES:BP=7000:FF00h, BX=0400h cannot be specified. u SCSI BIOS does not check DMA boundaries. If the transfer area crosses segments, wraparound will occur within the segment, so be careful. o BX (number of bytes to transfer) must be set to an integer multiple of the sector length. If a value that is not divisible by the sector length is specified, the fraction will be discarded. u If BX (number of bytes to transfer) is set to 0000h, 64KB will be transferred. (Undocumented) However, it seems that some BIOSes will abnormally terminate without transferring anything. u If BX (number of bytes to transfer) is set to between 1 and sector length - 1, the SCSI BIOS will terminate normally without transferring anything. o The PC-H98 supports indirect mode, which allows transfers to areas over 1MB. Whether indirect mode is available can be determined by 0000:0590h bit 6 (SASI/ESDI), bit 4 (SCSI). To specify indirect mode, set 0000:0590h bit 7 (SASI/ESDI), bit 5 (SCSI) to 1. When this bit is 0, the previous direct mode is used. In direct mode, the transfer address is specified directly with ES:BP, but in indirect mode, the transfer address is specified indirectly with ES:BP. In other words, the transfer address is written to memory as a 32-bit linear address. ES:BP specifies the memory address to which the 32-bit linear address is written. Once the BIOS is executed in indirect mode, it will always return to direct mode. Related INT 1Bh - Function 01h (SASI/SCSI/ESDI/IDE) INT 1Bh - Function 05h (SASI/SCSI/ESDI/IDE) INT 1Bh - Function 03h (SASI/SCSI/ESDI/IDE) Classification DISK BIOS Name Initialize (INITIALIZE) Target SASI, SCSI, ESDI, IDE Input AH=03h AL=DA/UA ------------+----------- Device type | DA/UA value (x is optional) ------------+----------- SASI/IDE | 0xh,8xh ESDI | 0xh,8xh SCSI | 2xh,Axh ------------+----------- Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist -----------+------------------------------------------ Explanation o Initializes the controller, work area, etc. Already initialized when the system starts up. u Checks the hard disk connection status and registers it in the system common area. Related 0000:0460h 0000:0482h 0000:055Ch INT 1Bh - Function 04h (SASI/ESDI/IDE) Classification DISK BIOS Name Sense (SENSE) Target SASI, ESDI, IDE Input AH=04h AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- SASI/IDE | 00h,01h,03h,80h,81h,83h ESDI | 02h,82h ------------+----------- Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 0xh (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist 60h (CF=1) | Not Ready | Device not connected■[ESDI] 90h (CF=1) | Time Out | Device not connected■[SASI] -----------+------------------------------------------ ■When AH=0xh AH bit 3-0=Capacity 0h: 5MB 1h: 10MB 2h: 15MB 3h: 20MB 4h: 25MB 5h: 40MB 9h: ESDI 100MB Fh: IDE 80MB or more Explanation o Gets the capacity of the hard disk. u Note that the value indicating the capacity returned to AH is different from the AH of INT 1Bh - Function 84h(SASI). Also, the description in the technical data book does not match the execution result on the actual machine. u When the drive is not connected, SASI and ESDI return an error in the return code. IDE always ends normally. o The hard disk connection status is indicated in the system common area (0000:055Ch bit 11-8). Related INT 1Bh - Function 84h (SASI) 0000:055Ch bit 11-8 INT 1Bh - Function 04h (SCSI) Classification DISK BIOS Name Ready state sense Undocumented Target SCSI (excluding the first generation PC-9801-55) Input AH=04h AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- SCSI | 20-26h, A0-A6h ------------+----------- Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Device is in Ready state 40h (CF=1) | Equipment Check | BIOS specified by DA does not exist 6xh (CF=1) | Not Ready | Device is in Not Ready state (e.g. when no disk is set for MO or CD-ROM) 90h (CF=1) | Time Out | Device not connected -----------+------------------------------------------ Explanation o Tests the availability (ready) status of the logical unit. o The connection status of the hard disk is shown in the system common area (0000:0482h). Related INT 1Bh - Function 84h (SCSI) 0000:0482h INT 1Bh - Function 14h (SCSI) Classification DISK BIOS Name Get device type Undocumented Target SCSI (excluding the first generation PC-9801-55) Input AH=14h AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- SCSI | 20-26h, A0-A6h ------------+----------- Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist 90h (CF=1) | Time Out | Device not connected -----------+------------------------------------------ ■When AH=00h BH bit 7 = RMB (Removable) 1 = Removable media 0 = Non-removable media BH bits 6-0 = Device Type Modifier BL bits 7,6 = Peripheral Qualifier BL bits 5-0 = Device type value ---------+-------------- BL value | Meaning ---------+-------------- 00h | Hard disk 01h | Tape unit 05h | CD-ROM 07h | 3.5" MO 84h | 5" MO ---------+-------------- Explanation o Issues an INQUIRY command to a SCSI device to obtain device attributes. The first two bytes of the INQUIRY data are returned to the BX register. Related 0000:0460h INT DCh - Function 09h Subfunction 0000h INT 1Bh - Function 24h (SCSI) Classification DISK BIOS Name Parameter table setting Undocumented Target SCSI (excluding the first generation PC-9801-55) Input AH=24h AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- SCSI | 20-26h, A0-A6h ------------+----------- BX=sector length CX=number of cylinders DH=number of heads DL=number of sectors/track Output AH=return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist -----------+------------------------------------------ Explanation o Sets the SCSI device specifications in the system common area (0000:0460-047Fh). Since it only sets the specified specifications in the system common area, it always ends normally even if the drive is not connected. o The specifications that can be obtained with INT 1Bh - Function 84h (SCSI) are the values set by this function. o The sector type that can be obtained with INT 1Bh - Function 44h (SCSI) is always set to soft sector. u Hangs when executed with BX=0000h. Related 0000:0460h INT 1Bh - Function 84h (SCSI) INT 1Bh - Function 44h (SCSI) Classification DISK BIOS Name Sense 2 (SENSE2) Target SCSI Input AH=44h AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- SCSI | 20-26h, A0-A6h ------------+----------- Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist -----------+------------------------------------------ ■When AH=00h BX=Sector type 0002h: Hard sector 0001h: Soft sector Explanation o Returns the type of disk sector. o This returns the result by referencing the system common area, so it always ends normally even if the drive is not connected. Related 0000:0460h INT 1Bh - Function 54h (ESDI) Classification DISK BIOS Name Get NESA slot Undocumented Target ESDI Input AH=54h AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- ESDI | 02h,82h ------------+----------- BX=0000h Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist -----------+------------------------------------------ ■When AH=00h CH=Product code ESDI HD=02h CL=Logical slot number HDC dedicated slot = 06h Explanation o Gets the slot number where the HDC is installed. Related INT 1Fh - Function C0h INT 1Bh - Function 84h (SASI/ESDI/IDE) Classification DISK BIOS Name New Sense Target SASI (except PC-9801-27), ESDI, IDE Input AH=84h AL=DA/UA ------------+-------------------------------------+----------- Device type | Sector address specification method | DA/UA value ------------+-------------------------------------+----------- SASI/IDE | Linear sector address | 00h,01h,03h SASI/IDE | Absolute sector address | 80h,81h,83h ESDI | Linear sector address | 02h ESDI | Absolute sector address | 82h ------------+-------------------------------------+----------- Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 0xh (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist 60h (CF=1) | Not Ready | Device not connected■[ESDI] 90h (CF=1) | Time Out | Device not connected■[SASI] -----------+------------------------------------------ ■When AH=0xh AH bit 3-0=Capacity 00h: 5MB 01h: 10MB 02h: 15MB 03h: 20MB 05h: 25MB 07h: 40MB 09h: ESDI 100MB 0Fh: IDE 80MB or more BX=Sector length 0100h: 256 bytes 0200h: 512 bytes CX=Number of cylinders - 1 DH=Number of heads DL=Number of sectors Explanation o Gets the disk specifications. u Note that the value indicating the capacity returned to AH is different from the AH of INT 1Bh - Function 04h (SASI/ESDI/IDE). Also, the description in the Technical Data Book does not match the execution result on the actual machine. The value set in CX is the number of cylinders - 1, which is different from the description in the Technical Data Book. u When no drive is connected, SASI and ESDI return an error in the return code. IDE always ends normally. u The BIOS on the PC-9801-27 (5-inch fixed disk interface board) and the BIOS supporting the PC-9801-07 (5-inch fixed disk interface board) do not support this function (the same applies to the built-in SASI BIOS of the PC-9801F3/M3/VM4, which is a compatible BIOS). However, in MS-DOS environments after MS-DOS 3.1 (PS98-011), MS-DOS traps this function and emulates it. In this case, 0000:0480h bit 7 = 1. u The SASI BIOS in high-resolution mode (in the F800h segment of the main unit), the built-in SASI BIOS, ESDI BIOS, and IDE BIOS of the PC-9801VX4 and later support this function. u Whether this function is supported can be determined as follows. 1. High-resolution mode always supports it. 2. In normal mode, this function can be used when 0000:0480h bit 7 = 1. 3. ESDI BIOS (DA/UA = 02h, 03h, 82h, 83h) always supports it (0000:0480h bit 7 is 0). Related INT 1Bh - Function 04h(SASI/ESDI/IDE) 0000:0480h bit 7 INT 1Bh - Function 84h (SCSI) Classification DISK BIOS Name New Sense Target SCSI Input AH=84h AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- SCSI | 20-26h, A0-A6h ------------+----------- Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist -----------+------------------------------------------ ■When AH=00h BX=Sector length 0100h: 256 bytes 0200h: 512 bytes 0400h: 1024 bytes CX=Number of cylinders - 1 DH=Number of heads DL=Number of sectors (per track) Explanation o Gets disk specifications. u The number of cylinders set in CX is the number of cylinders - 1, which differs from the description in the SCSI interface technical book. u It only refers to the parameter table in the system common area and returns the result, so it always ends normally even if no drive is connected. u It cannot get specifications of devices other than hard disks. For devices other than hard disks, the parameter table in the system common area (0000:0460h) stores device type values, etc. When this function is executed, it simply interprets the contents as the specifications of a hard disk and returns a meaningless value. u If a 3.5"MO or 5"MO is connected, the SCSI BIOS stores the device type value in the parameter table in the system common area (0000:0460h). However, MS-DOS 5.0 rewrites this parameter table to match the MO specifications. Therefore, the specifications of MO can be obtained under MS-DOS 5.0 environment. u The specifications obtained by this function do not necessarily correspond to the physical structure of the hard disk. Related 0000:0460h INT 1Bh - Function 05h (SASI/SCSI/ESDI/IDE) Classification DISK BIOS Name Write data (WRITE DATA) Target SASI, SCSI, ESDI, IDE Input AH= ■[SASI・ESDI・IDE] bit 7,6=00b bit 5=r 1=No retry 0=8 retries bit 4=0 bit 3〜0=0101b ■[SCSI] bit 7=0 bit 6=e 1=Error sector notification 0=No error sector notification bit 5,4=00b bit 3〜0=0101b AL=DA/UA ------------+--------------------------+----------- Device type | Sector addressing method | DA/UA value ------------+--------------------------+----------- SASI・IDE | Linear sector address | 00h,01h,03h SASI/IDE | Absolute sector address | 80h,81h,83h ESDI | Linear sector address | 02h ESDI | Absolute sector address | 82h SCSI | Linear sector address | 20-26h SCSI | Absolute sector address | A0-A6h ------------+--------------------------+----------- BX=Number of bytes transferred ■When linear sector address is specified DX:CX=Linear sector address (0-) ■When absolute sector address is specified CX=Cylinder number (0-) DH=Head number (0-) DL=Sector number (0-) ES:BP=Transfer address Output CF=End condition 1=Abnormal end 0=Normal end AH=Status information ■[SCSI] When an error occurs with AH bit 6=1 (error sector notification) DX,CX=Error sector address Explanation o Writes data to the specified sector. If linear sector addressing is used, writing to MO is also possible. o ES:BP (transfer address) and BX (number of transfer bytes) must be set so that the transfer area does not cross a 64K byte physical address boundary. For example, an area such as ES:BP=7000:FF00h, BX=0400h cannot be specified. If this rule is violated, a DMA boundary error will occur in SASI, ESDI, and IDE BIOS. u SCSI BIOS does not check DMA boundaries. If the transfer area crosses segments, wraparound will occur within the segment, so care must be taken. o BX (number of transfer bytes) must be specified as an integer multiple of the sector length. If a value that is not divisible by the sector length is specified, the fraction will be discarded. u Specifying 0000h for BX (number of transfer bytes) will transfer 64K bytes. (Undocumented) However, it seems that some BIOSes will abnormally terminate without transferring data. u If BX (number of bytes to transfer) is set to 1 to sector length - 1, the SASI/ESDI BIOS will hang. The SCSI BIOS will terminate normally without transferring data. The IDE BIOS will transfer 64K bytes, but will not check the DMA boundary. If the transfer area spans multiple segments, wraparound will occur within the segment, so care must be taken. o The PC-H98 supports indirect mode, which allows transfers to areas over 1MB. Whether indirect mode is available can be determined by checking 0000:0590h bit 6 (SASI/ESDI), bit 4 (SCSI). To specify indirect mode, set 0000:0590h bit 7 (SASI/ESDI), bit 5 (SCSI) to 1. When this bit is 0, the previous direct mode is used. In direct mode, the transfer address is specified directly with ES:BP, but in indirect mode, the transfer address is specified indirectly with ES:BP. In other words, the transfer address is written to memory as a 32-bit linear address. ES:BP specifies the memory address to which the 32-bit linear address is written. Once the BIOS has been executed in indirect mode, it will always be returned to direct mode. Related INT 1Bh - Function 02h (SCSI) INT 1Bh - Function 06h (SASI/SCSI/ESDI/IDE) Classification DISK BIOS Name Data read (READ DATA) Target SASI, SCSI, ESDI, IDE Input AH= ■[SASI・ESDI・IDE] bit 7,6=00b bit 5=r 1=No retry 0=8 retry attempts bit 4=0 bit 3〜0=0110b ■[SCSI] bit 7=0 bit 6=e 1=Error sector notification 0=No error sector notification bit 5,4=00b bit 3〜0=0110b AL=DA/UA ------------+-------------------------+----------- Device type |Sector addressing method | DA/UA value ------------+-------------------------+----------- SASI・IDE | Linear sector address | 00h,01h,03h SASI/IDE | Absolute sector address | 80h,81h,83h ESDI | Linear sector address | 02h ESDI | Absolute sector address | 82h SCSI | Linear sector address | 20-26h SCSI | Absolute sector address | A0-A6h ------------+-------------------------+----------- BX=Number of bytes transferred ■When linear sector address is specified DX:CX=Linear sector address (0-) ■When absolute sector address is specified CX=Cylinder number (0-) DH=Head number (0-) DL=Sector number (0-) ES:BP=Transfer address Output CF=End condition 1=Abnormal end 0=Normal end AH=Status information ■[SCSI] When an error occurs with AH bit 6=1 (error sector notification) DX,CX=Error sector address Explanation o Reads data from the specified sector. By using linear sector addressing, reading from MO and CD-ROM (SCSI) is also possible. However, reading from IDE CD-ROM uses INT 1Bh - Function 16h (IDE CD-ROM). o ES:BP (transfer address) and BX (number of bytes transferred) must be set so that the transfer area does not cross the 64K byte boundary of the physical address. For example, you cannot specify an area such as ES:BP=7000:FF00h, BX=0400h. If this rule is violated, a DMA boundary error will occur in SASI, ESDI, and IDE BIOS. u SCSI BIOS does not check DMA boundaries. If the transfer area crosses segments, wraparound will occur within the segment, so be careful. o BX (number of bytes transferred) must be specified as an integer multiple of the sector length. If a value that is not divisible by the sector length is specified, the fraction will be truncated. u If 0000h is specified for BX (number of bytes transferred), 64K bytes will be transferred. (Undocumented) However, it seems that some BIOSes will abnormally terminate without transferring. u If 1 to sector length - 1 is specified for BX (number of bytes transferred), SASI/ESDI BIOS will hang. SCSI BIOS will terminate normally without transferring. IDE BIOS will transfer 64K bytes, but will not check DMA boundaries. If the transfer area spans segments, wraparound will occur within the segment, so be careful. o PC-H98 supports indirect mode, which allows transfers to areas over 1MB. Whether indirect mode is available can be determined by 0000:0590h bit 6 (SASI/ESDI), bit 4 (SCSI). To specify indirect mode, set 0000:0590h bit 7 (SASI/ESDI), bit 5 (SCSI) to 1. When this bit is 0, the previous direct mode is used. In direct mode, the transfer address is specified directly with ES:BP, but in indirect mode, the transfer address is specified indirectly with ES:BP. In other words, the transfer address is written to memory as a 32-bit linear address. ES:BP specifies the memory address to which the 32-bit linear address is written. Once the BIOS has been executed in indirect mode, it will always return to direct mode. Related INT 1Bh - Function 16h (IDE CD-ROM) INT 1Bh - Function 07h (SASI/SCSI/ESDI/IDE) Classification DISK BIOS Name Seek to cylinder 0 (RECALIBRATE) Target SASI, SCSI, ESDI, IDE Input AH= ■[SASI・ESDI・IDE] bit 7,6=00b bit 5=r 1=No retry 0=8 retry attempts bit 4=0 bit 3〜0=0111b ■[SCSI] 07h AL=DA/UA ------------+-------------------------+----------- Device type |Sector addressing method | DA/UA value ------------+-------------------------+----------- SASI・IDE | Linear sector address | 00h,01h,03h SASI・IDE | Absolute sector address | 80h,81h,83h ESDI | Linear sector address | 02h ESDI | Absolute sector address | 82h SCSI | Linear sector address | 20-26h SCSI | Absolute sector address | A0-A6h ------------+-------------------------+----------- Output CF=End condition 1=Abnormal end 0=Normal end AH=Status information Explanation o Seek to cylinder 0. Related INT 1Bh - Function 08h (IDE) Classification DISK BIOS Name HD CACHE control Undocumented Target IDE (PC-9821Ap2, As2, Bf, Bp, Bs, Be, Cs2, Ce2, Ts, PC-9801BX2, BS2, BA2) Input AH=08h AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- IDE | 00h,01h,80h,81h ------------+----------- DL=Caching status 00h=Cache OFF 01h=Cache ON FFh=Get cache status Output AH=Output status DL=Caching status 00h=Cache OFF 01h=Cache ON Explanation o Controls the cache status. Related INT 1Bh - Function 08h (SASI) Classification DISK BIOS Name Assign Alternate Track (ASSIGN ALTERNATE TRACK) Target SASI Input AH=08h AL=DA/UA ------------+-------------------------------------+----------- Device type | Sector address specification method | DA/UA value ------------+-------------------------------------+----------- SASI | Linear sector address | 00h,01h SASI | Absolute sector address | 80h,81h ------------+-------------------------------------+----------- BX=04h (buffer length) ■When linear sector address is specified DX:CX=Sector address on alternative track (0~) ■When absolute sector address is specified CX=Cylinder number of alternative track (0~) DH=Head number of alternative track (0~) DL=00h ES:BP = 4-byte buffer address that stores the alternative track address Output AH = Return code -------------+------------------------------------------ AH | Contents -------------+------------------------------------------ 00h (CF = 0) | Normal End | Normal end 40h (CF = 1) | Equipment Check | The BIOS specified by DA does not exist -------------+------------------------------------------ Explanation o Used in pairs with INT 1Bh - Function 0Bh (SASI) to assign alternative tracks. Notifies the hard disk controller of the alternative track address. u Only the '86 edition Technical Data Book contains an explanation of this function. Related INT 1Bh - Function 0Bh (SASI) INT 1Bh - Function 09h (SCSI/ESDI) Classification DISK BIOS Name Track/sector replacement processing (REASSIGN BLOCKS) Target SCSI, ESDI Input AH= ■[SCSI] AH=09h ■[ESDI] bit 7,6=00b bit 5=r 1=No retry 0=8 retries bit 4=0 bit 3~0=1001b AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- ESDI | 02h,82h SCSI | 20~26h,A0~A6h ------------+----------- BX=Number of bytes in DEFECT LIST buffer ES:BP=First address of DEFECT LIST buffer <DEFECT LIST format> -----------------+------------------------- Address | Contents -----------------+------------------------- ES:BP+00h(WORD) | 0000h ES:BP+02h(WORD) | Number of bad sector information x 4 ES:BP+04h(DWORD) | Logical address 1 of bad sector : | : ES:BP+xxh(DWORD) | Logical address n of bad sector -----------------+------------------------- * Logical addresses of bad sectors are stored in ascending order Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | BIOS specified by DA does not exist, | Specified device does not exist 98h (CF=1) | Defect List Error | An error occurred while reading the DEFECT LIST A8h (CF=1) | No Defect Spare Location | Replacement processing cannot be performed because there is no more replacement area -----------+----------------------------------------- Explanation o Assigns a replacement track to the defective track. o In the case of SCSI HD, replacement is performed on a track-by-track basis on soft sector disks, and on sector-by-sector basis on hard sector disks. Related INT 1Bh - Function 0Ch(SCSI/ESDI) INT 1Bh - Function 8Ch(SCSI/ESDI) INT 1Bh - Function 0Ah (SCSI/ESDI) Classification DISK BIOS Name Sector length specification (SET SECTOR) Target SCSI, ESDI Input AH=0Ah AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- ESDI | 02h,82h SCSI | 20-26h,A0-A6h ------------+----------- BH=sector length 01h= 256 bytes (SCSI, ESDI 40MB, ESDI 100MB) 02h= 512 bytes (SCSI, ESDI 40MB) 04h=1024 bytes (SCSI) Output AH=return code -------------+------------------------------------------ AH | Contents -------------+------------------------------------------ 00h (CF = 0) | Normal End | Normal end 40h (CF = 1) | Equipment Check | BIOS specified by DA does not exist | Specified device does not exist | Invalid sector length specified -------------+------------------------------------------ Explanation o INT 1Bh - Specifies the sector length when formatting with Function 0Dh (SCSI/ESDI). Related INT 1Bh - Function 0Dh (SCSI/ESDI) INT 1Bh - Function 0Bh (SASI) Classification DISK BIOS Name Assign alternate track to bad track (FORMAT BAD TRACK) Target SASI Input AH=0Bh AL=DA/UA ------------+-------------------------------------+----------- Device type | Sector address specification method | DA/UA value ------------+-------------------------------------+----------- SASI | Linear sector address | 00h,01h SASI | Absolute sector address | 80h,81h ------------+-------------------------------------+----------- BX=04h (buffer length) ■When linear sector address is specified DX:CX=Sector address on bad track (0~) ■When absolute sector address is specified CX=Cylinder number of bad track (0~) DH=Head number of bad track (0~) DL=00h ES:BP=Buffer address where the alternative track address is stored * Same address as when INT 1Bh - Function 08h (SASI) was executed immediately before Output CF=End condition 1=Abnormal end 0=Normal end AH=Status information Explanation o Used in pairs with INT 1Bh - Function 08h (SASI) to assign alternative tracks. Assigns an alternative track to a defective track. u Only the '86 Technical Data Book contains an explanation of this function. Related INT 1Bh - Function 08h (SASI) INT 1Bh - Function 0Ch (SCSI/ESDI) Classification DISK BIOS Name Get bad sector list (READ DEFECT DATA) Target SCSI, ESDI Input AH= ■[SCSI] AH=0Ch ■[ESDI] bit 7,6=00b bit 5=r 1=No retry 0=8 retry attempts bit 4=0 bit 3~0=1100b AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- ESDI | 02h,82h SCSI | 20~26h,A0~A6h ------------+----------- BX=Number of bytes in DEFECT LIST buffer ES:BP=First address of DEFECT LIST buffer * DEFECT LIST format is INT 1Bh - Same as Function 09h (SCSI/ESDI) Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | BIOS specified by DA does not exist, | Specified device does not exist 98h (CF=1) | Defect List Error | An error occurred while reading the DEFECT LIST -----------+------------------------------------------ Explanation o BX (number of bytes in the DEFECT LIST buffer) is calculated from the value returned to CX by executing INT 1Bh - Function 8Ch (SCSI/ESDI). The size of the buffer must be CX x 4 + 4 bytes. Related INT 1Bh - Function 09h (SCSI/ESDI) INT 1Bh - Function 8Ch (SCSI/ESDI) INT 1Bh - Function 8Ch(SCSI/ESDI) Classification DISK BIOS Name Get number of bad sectors (READ DEFECT NUMBER) Target SCSI, ESDI Input AH= ■[SCSI] AH=8Ch ■[ESDI] bit 7,6=10b bit 5=r 1=No retry 0=8 retries bit 4=0 bit 3~0=1100b AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- ESDI | 02h,82h SCSI | 20~26h,A0~A6h ------------+----------- Output AH=Return code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist. | The specified device does not exist. 98h (CF=1) | Defect List Error | An error occurred while reading the DEFECT LIST. -----------+------------------------------------------ CX=Number of replaced bad sectors Explanation o Gets the number of replaced bad sectors. Related INT 1Bh - Function 09h(SCSI/ESDI) INT 1Bh - Function 0Ch(SCSI/ESDI) INT 1Bh - Function 0Dh (SASI/IDE) Classification DISK BIOS Name Format (FORMAT TRACK/DRIVE) Target SASI, IDE Input AH bit 7 = Format unit specification 1: Drive unit 0: Track unit bit 6 = 0 bit 5 = r 1 = No retry 0 = 8 retry times bit 4 = 0 bit 3 to 0 = 1101b AL = DA/UA ------------+-------------------------------------+----------- Device type | Sector address specification method | DA/UA value ------------+-------------------------------------+----------- SASI/IDE | Absolute sector address | 80h, 81h, 83h ------------+-------------------------------------+----------- BH = Interleave factor (usually 05h is specified) CX = Cylinder number (AH bit (When AH bit 7=1, specify 0000h) DH = head number (When AH bit 7=1, specify 00h) DL = 00h Output CF=termination condition 1=abnormal termination 0=normal termination AH=status information Explanation o Formats by track or drive. u For IDE HD, when track unit is specified, it ends normally without doing anything. When drive unit is specified, it does not actually perform formatting process, writes E5h to the first 16K bytes of the disk, and ends normally. Related INT 1Bh - Function 0Dh (SCSI/ESDI) Classification DISK BIOS Name Format (FORMAT DRIVE/TRACK) Target SCSI, ESDI Input AH bit 7 = Format unit specification 1: Drive unit 0: Track unit (cannot be specified) bit 6-4=000b bit 3-0=1111b AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- ESDI | 02h,82h SCSI | 20-26h,A0-A6h ------------+----------- Output CF=End condition 1=Abnormal end 0=Normal end AH=Status information Explanation o Format. If track unit is specified, it will end without actually doing anything. o Before formatting, specify the sector length with INT 1Bh - Function 0Ah (SCSI/ESDI). Related INT 1Bh - Function 0Ah (SCSI/ESDI) INT 1Bh - Function 0Eh (SASI/ESDI/IDE) Classification DISK BIOS Name Mode setting (MODE SET) Undocumented Target SASI, ESDI, IDE (normal mode only) Input AH bit 7 = mode 1: Thin (half height) 0: Thick (full height) bit 6-0 = 0001110b AL = DA/UA ------------+----------- Device type | DA/UA value ------------+----------- SASI/IDE | 00h,01h,03h,80h,81h,83h ESDI | 02h,82h ------------+----------- Output AH = return code -------------+------------------------------------------ AH | Contents -------------+------------------------------------------ 00h (CF = 0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist -------------+----------------------------------------- Explanation o The pointers and flags in the system common area are changed according to the mode specified by AH bit 7. The addresses and bit positions are shown in the table below. --------+-------------------+---------------- DA/UA | Pointer location | Flag location --------+-------------------+---------------- 80h,00h | 0000:05E8h(DWORD) | 0000:0481h bit 0 81h,01h | 0000:05ECh(DWORD) | 0000:0481h bit 1 82h,02h | D000:005Ah(DWORD) | 0000:0590h bit 0 83h,03h | D000:005Eh(DWORD) | 0000:0590h bit 1 --------+-------------------+---------------- * The ESDI HD pointer is in the ESDI BIOS segment. o When AH bit 7=0 (specifies thick type), the pointer to the parameter table is switched to that for a 20MB full-height drive (the parameter table is in the HD BIOS). When AH bit 7=1 (specifies thin type), the pointer to the parameter table is switched to that for a 20MB half-height drive (the parameter table is in the HD BIOS). o The flags are set according to the following table based on the mode and the sector length of the drive. ----------------+---------------+------ Mode (AH bit 7) | Sector length | Flags ----------------+---------------+------ 0 | 256 bytes | 0 0 | 512 bytes | 1 1 | 256 bytes | 0 1 | 512 bytes | 0 ----------------+---------------+------ Related 0000:0481h bit 1,0 0000:0590h bit 1,0 0000:05E8h 0000:05ECh INT 1Bh - Function 0Fh (SASI/SCSI/ESDI/IDE) Classification DISK BIOS Name Retract (RETRACT) Target SASI, SCSI, ESDI, IDE Input AH= ■[SASI,ESDI,IDE] bit 7,6=00b bit 5=r 1=No retry 0=8 retry attempts bit 4=0 bit 3~0=1111b ■[SCSI] AH=0Fh AL=DA/UA ------------+----------- Device type | DA/UA value ------------+----------- SASI | 00h,01h,03h,80h,81h,83h ESDI | 02h,82h SCSI | 20~26h,A0~A6h ------------+----------- Output AH=Return Code -----------+------------------------------------------ AH | Contents -----------+------------------------------------------ 00h (CF=0) | Normal End | Normal end 40h (CF=1) | Equipment Check | The BIOS specified by DA does not exist. | The specified device cannot be retracted. 60h (CF=1) | Not Ready | The device is not ready. 90h (CF=1) | Time Out | The device is not connected. -----------+------------------------------------------ Explanation o Moves the head to an unused cylinder. o On IDE HD, the command ends normally without doing anything. Related